package com.kube.design.singleton;

/**
 * @author q.zhangr
 * @version 1.0.0
 * @date 2020/7/22
 */
public enum  SingletonEnum {


    //创建一个枚举对象，该对象天生为单例
    INSTANCE;

    private User user;

    //私有化枚举的构造函数
    private SingletonEnum(){
        user=new User();
    }
    public User getInstnce(){
        return user;
    }

}
